<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        a{
            text-decoration: none;
            color: #333;
        }
        ul li{
            display: inline-block;
            height: 20px;
            width: 60px;
        }
        ul li a {
            display: block;
            text-align: center;
            background-color: #ccc;
        }
        .active{
            background-color: purple;
        }
        .content{
            width: 186px;
            height: 200px;
            border: 1px solid #ccc;
        }
    </style>
    <script>
        window.onload=function(){
            var as=document.querySelectorAll("li a");
            for(var i=0; i < as.length; i++){
                as[i].onclick=function(){
                    for (var j = 0; j < as.length; j++) {
							as[j].className = ""; /* 排版 */
						}
                        this.className = "active";
                    /* ajax*/
                    var url = this.attributes["data-url"].value;
                }
            }
        }
    </script>
</head>

<body>
    <!-- ul>(li>a[href=#{liebiao$})*3   -->
    <ul>
        <li><a href="#" class="active" data-url="http://a">liebiao1</a></li>
        <li><a href="#" data-url="http://b">liebiao2</a></li>
        <li><a href="#" data-url="http://c">liebiao3</a></li>
    </ul>     
    <div class="content">

    </div> 
</body>

</html>